/*
 * @Description:
 * @Version: 2.0
 * @Autor: wiz
 * @Date: 2024-07-26 08:47:55
 * @LastEditors: swc
 * @LastEditTime: 2024-09-20 13:06:55
 */
import { cusrNode } from '@/components/base/graph/c-bpmn/config';
import { T_srv, Tsrv, ifs, ts, tvs, vue } from '@/services';
import { N_cFlowchart } from '@/types';
import { I_cmd, T_cmd } from './command';
import { N_oApprovalInfo } from './types';

const stepsBpmnConfig = (): N_cFlowchart.I_conf => {
  const cf = new N_cFlowchart.T_conf();
  cf.regNodes = cusrNode;
  // cf.toolbar = { show: false };
  cf.workMode = 'view';
  // cf.regEvent = this.GT_command.regGraphEvents;
  return cf;
};

const initButtons = (): Array<N_oApprovalInfo.I_button> => [
  {
    title: '选择下级',
    isShow: false,
    value: 'select'
  },
  {
    title: '通过',
    isShow: true,
    value: 'pass'
  },
  {
    title: '驳回',
    isShow: true,
    value: 'reject'
  },
  {
    title: '撤销审批',
    isShow: true,
    value: 'revoke'
  },
  // {
  //   title: '批示',
  //   value: 'annotate'
  // },
  {
    title: '测试',
    isShow: false,
    value: 'debug'
  }
];

export {
  I_cmd,
  N_cFlowchart,
  N_oApprovalInfo,
  T_cmd,
  T_srv,
  Tsrv,
  ifs,
  initButtons,
  stepsBpmnConfig,
  ts,
  tvs,
  vue
};
